package com.yh.patterns.bridge.Haier;

/**
 * @Auther:云尚学Java
 */
public class Client {
    public static void main(String[] args) {
        //创建Haier产品-----采用多态方式创建
        ElectFactory haierTV=new Haier(new Television());
        ElectFactory haierAirCd=new Haier(new AirConditioner());
        ElectFactory haierRef=new Haier(new Refrigeratory());
        haierTV.produce("海尔");
        haierAirCd.produce("海尔");
        haierRef.produce("海尔");

        System.out.println("===========");
        ElectFactory hisenseTV=new Hisense(new Television());
        ElectFactory hisenseAirCd=new Hisense(new AirConditioner());
        ElectFactory hisenseRef=new Hisense(new Refrigeratory());
        hisenseTV.produce("海信");
        hisenseAirCd.produce("海信");
        hisenseRef.produce("海信");

        System.out.println("============");
        ElectFactory TCLTV=new TCL(new Television());
        ElectFactory TCLAirCd=new TCL(new AirConditioner());
        ElectFactory TCLRef=new TCL(new Refrigeratory());
        TCLTV.produce("TCL");
        TCLAirCd.produce("TCL");
        TCLRef.produce("TCL");
    }
}
